import React from 'react'
import { getGoods } from '../api/goods'

export default function AxiosDemo() {

    const fetchGoods = async e => {
        const data = await getGoods()
        console.log("fetchGoods",data);
    }
    const fetchChannels = e => {

    }
    
    return (
        <>
            <div>AxiosDemo</div>
            <button onClick={fetchGoods}>获取商品数据</button>
            <button onClick={fetchChannels}>获取频道数据</button>
        </>
    )
}
